<html>
<head>
<title>Welcome</title>
<script>
function clickRow(id){
	parent.f1.document.getElementById('idId').value = document.getElementById(id).cells[0].innerText;
	parent.f1.document.getElementById('userId').value = document.getElementById(id).cells[1].innerText;
	parent.f1.document.getElementById('passId').value = document.getElementById(id).cells[2].innerText;
}
</script>
</head>
<body>
<?php
$us=$_POST [userV];
$uv=$_POST [passV];

/*$servr  = 'localhost';
$username ='root';
$password = '';
$database = 'ibsdb';


$conn = @mysql_connect($servr, $username, $password);
$dbconnect = @mysql_select_db($database, $conn);
$resul = mysql_query("insert into member(user,pass) values('$us','$uv')");
$result = mysql_query("select * from member");*/

include "dbclass.php";

$servr  = 'localhost';
$username ='root';
$password = '';
$database = 'ibsdb';
$cDB = new DB_Connect($servr, $username, $password, $database);

// test select query
$results = $cDB->query_db("insert into member(user,pass) values('$us','$uv')");
$results = $cDB->query_db("select * from member");
$cDB->mysql_result_all($results,mysql_num_rows($results));

?>
<!--<TABLE BGCOLOR="#33CC99" WIDTH="50%" BORDER="1">
<tr><th>ID</th><th>USER NAME</th><th>PASSWORD</th></tr>-->
<?php
 /* for($count=0;$count<mysql_num_rows($result);$count++){
  $row = mysql_fetch_row($result);?>
  <tr onClick="clickRow(this.id);" id='<?php print($row[0]) ?>'><td><?php echo $row[0]?></td><td><?php echo $row[1]?></td><td><?php echo $row[2]?></td></tr>
  <?php }*/ ?>
  <!--</table>-->
</body>
</html>
